import '../../scss/eleMsg.scss'
import Vue from 'vue'
import MintUI from 'mint-ui'
import com from "../unit/common"

Vue.use(MintUI)
window.onload = function () {
  let page = {
    _eleCode: com.getUrlParam('eleCode') ? com.getUrlParam('eleCode') : '31103301052011010002',
    _app: {},
    _init() {
      this._loadTemp()
    },
    _loadTemp() {
      let self = this
      this._app = new Vue({
        el: '#app', created() {
          this.getEleDetail(self._eleCode)
        },
        data() {
          return {
            headerMsg: {}
          }
        },
        methods: {

          // 获取电梯详情
          getEleDetail(code) {
            com.axio.post(`${com.basePath4}/elevator-web/elevatorLogs/elevatorDetail`, {
              registerCode: code
            }).then((data) => {
              this.headerMsg = data.data.data
            }).catch((err) => {
              console.log(err)
            })
          },
        }
      })
    }
  }
  page._init()
}